package com.chilly.stack;

/**
 * @Author cuihaiyan
 * @Create_Time 2020-11-26 22:27
 * @Description: 85. 最大矩形
 * <p>
 * 给定一个仅包含 0 和 1 、大小为 rows x cols 的二维二进制矩阵，找出只包含 1 的最大矩形，并返回其面积。
 */
public class MaximalRectangle {

    public static void main(String[] args) {
        String[][] matrix = new String[][]{
                new String[]{"1", "0", "1", "0", "0"},
                new String[]{"1", "0", "1", "1", "1"},
                new String[]{"1", "1", "1", "1", "1"},
                new String[]{"1", "0", "0", "1", "0"},
        };

        int sum = 0;
        for (String[] ss : matrix) {
            for (String s : ss) {
                sum=sum+Integer.parseInt(s);
            }
        }
        System.out.println(sum);

    }

    public static int maximalRectangle(char[][] matrix) {
        return 0;
    }

}

